using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Generalization
{
    /// <summary>
    /// <para>Eliminate Polygon</para>
    /// <para>Eliminates a polygon by merging it with the polygon from the surrounding features that it shares the longest boundary with.</para>
    /// <para>通过将面与与其共享最长边界的周围要素中的面合并来消除面。</para>
    /// </summary>    
    [DisplayName("Eliminate Polygon")]
    public class EliminatePolygon : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EliminatePolygon()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The feature layers that contain the polygons to be deleted.</para>
        /// <para>包含要删除的面的要素图层。</para>
        /// </param>
        /// <param name="_surrounding_features">
        /// <para>Surrounding Features</para>
        /// <para>The polygon features that the Input Features are compared against. If the feature is smaller than the Minimum Area, it becomes part of the input features.</para>
        /// <para>与输入要素进行比较的面要素。如果要素小于最小面积，则该要素将成为输入要素的一部分。</para>
        /// </param>
        public EliminatePolygon(object _in_features, List<object> _surrounding_features)
        {
            this._in_features = _in_features;
            this._surrounding_features = _surrounding_features;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Eliminate Polygon";

        public override string CallName => "topographic.EliminatePolygon";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _surrounding_features, _min_area, _updated_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature layers that contain the polygons to be deleted.</para>
        /// <para>包含要删除的面的要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Surrounding Features</para>
        /// <para>The polygon features that the Input Features are compared against. If the feature is smaller than the Minimum Area, it becomes part of the input features.</para>
        /// <para>与输入要素进行比较的面要素。如果要素小于最小面积，则该要素将成为输入要素的一部分。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Surrounding Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _surrounding_features { get; set; }


        /// <summary>
        /// <para>Minimum Area</para>
        /// <para>Polygons smaller than the Minimum Area will be deleted. If the Minimum Area is left blank, all features or a selection set from the Input Features will be considered for elimination.</para>
        /// <para>小于最小面积的多边形将被删除。如果最小面积留空，则将考虑消除所有要素或输入要素中的选择集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Area")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _min_area { get; set; } = null;


        /// <summary>
        /// <para>Updated Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_features { get; set; }


        public EliminatePolygon SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}